<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./jquery-3.4.1.js"></script>
</head>

<body>
    <button>按钮1</button>
    <button>按钮2</button>
    <script>
        /* 标签自定义事件 : 用的比较少(了解)*/
        $("button").on("zhangSan", () => {
            console.log("zhangSan");
        })

        /* 注意：自定义事件无法触发，只能通过代码的方式来自动触发。 */
        $("button").trigger("zhangSan");
    </script>
</body>

</html>